using System;

namespace Work.API.Dtos.DrugManagement
{
    /// <summary>
    /// 已发药品DTO（用于查看已发药品模块）
    /// 继承自DrugOutboundDto，但专门用于已发药品查询显示
    /// </summary>
    public class DispensedDrugDto
    {
        /// <summary>
        /// 出库记录ID
        /// </summary>
        public int OutboundId { get; set; }

        /// <summary>
        /// 药品ID
        /// </summary>
        public int DrugId { get; set; }

        /// <summary>
        /// 药品名称
        /// </summary>
        public string? DrugName { get; set; }

        /// <summary>
        /// 卡号
        /// </summary>
        public string? CardNumber { get; set; }

        /// <summary>
        /// 患者姓名
        /// </summary>
        public string? PatientName { get; set; }

        /// <summary>
        /// 患者性别
        /// </summary>
        public bool? Gender { get; set; }

        /// <summary>
        /// 性别文本
        /// </summary>
        public string? GenderText => Gender.HasValue ? (Gender.Value ? "男" : "女") : null;

        /// <summary>
        /// 患者年龄
        /// </summary>
        public int? Age { get; set; }

        /// <summary>
        /// 患者身份证号
        /// </summary>
        public string? IdCard { get; set; }

        /// <summary>
        /// 出库数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 出库单价
        /// </summary>
        public decimal UnitPrice { get; set; }

        /// <summary>
        /// 出库总金额
        /// </summary>
        public decimal TotalAmount { get; set; }

        /// <summary>
        /// 出库日期
        /// </summary>
        public DateTime OutboundDate { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        public string? Operator { get; set; }
    }
}

